home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19981211-19990422 / 000319_news@watsun.cc.columbia.edu _Fri Mar 5 16:34:24 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id QAA20123
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 5 Mar 1999 16:34:23 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id QAA00022
  7.     for kermit.misc@watsun.cc.columbia.edu; Fri, 5 Mar 1999 16:19:09 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: running kermit from command line question
  11. Date: 5 Mar 1999 21:19:07 GMT
  12. Organization: Columbia University
  13. Message-ID: <7bphob$j$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@mailrelay2.cc.columbia.edu
  15.  
  16. In article <7bpgto$c6n$1@nnrp1.dejanews.com>,  <nmr103@my-dejanews.com> wrote:
  17. : We're using the following command to suck data off of a surface
  18. : meteorological sensor we have installed on /dev/term/b, and we have kermit..
  19. :
  20. Which version? 
  21.  
  22. : ...installed on solaris x86:
  23. : kermit -l /dev/term/b -C "output \13avg\13, connect /quietly" > output.file
  24. : This is working *great*, with one exception... the process is hanging.
  25. :
  26. Because you didn't specify an completion criterion.  So it just goes into
  27. CONNECT mode and stays there forever.
  28.  
  29. : We
  30. : feel like we should send some sort of break sequence after the \13avg\13
  31. : command we're sending to our device, but we've tried all sorts of
  32. : permutations and combinations of \28, \c, \b, \B, and so forth. We've tried
  33. : writing little wrapper scripts that kill the kermit process, but they don't
  34. : work, and were serious kluges to begin with.
  35. : Does anyone know how we can tack on a break sequence to the output command
  36. : we're sending to our device, or otherwise, a switch to the command line
  37. : command that tells kermit to disconnect and quit after about 5 seconds?
  38. The real way to do this is to write a script (see Chapters 17-19 of the
  39. manual) that does what you would do if you collected this data by hand,
  40. substituting OUTPUT, INPUT, and IF FAIL commands for the CONNECT command and
  41. your eyes, fingers, and brain.  If you know when it should terminate, you
  42. can make the script terminate under the same conditions.  If there is no
  43. clear "end of data" pattern from the device, you can make it terminate after
  44. a given amount of time, e.g.:
  45.  
  46.   set line /dev/term/b
  47.   if fail <do something>
  48.   set speed <whatever
  49.   set carrier-watch off
  50.   log session <filename>
  51.   output \13avg\13
  52.   input 60 xxxx
  53.   exit
  54.  
  55. In this example we just soak up whatever comes in for 60 seconds (assuming
  56. "xxx" will never come) and then exit.  The data is in the session log.
  57.  
  58. - Frank